function act() {
    if (cm.isQuestActive(64926)) {
        if (cm.getNumberFromQuestInfo(64936, cm.getMapId()) == 0) {
            cm.setNumberForQuestInfo(64936, cm.getMapId(), 1);
            var a = cm.addNumberForQuestInfo(64936, "switch", 1);
            cm.playerMessage(-1, "开启了一处电闸。");
            cm.playerMessage(5, "开启了一处电闸。");
            cm.getReactor().delayedDestroyReactor(60 * 1000);
            if (a == 4) {
                cm.openScriptNpc()
            }
        }
    }
}
var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.sendNormalTalk_Bottom("电闸全部开启了，要快点返回中央控制室找到杰斯。", 56, 0, 0, 1)
        } else {
            if (status === a++) {
                cm.dispose();
                cm.warp(867142012, 0, false)
            }
        }
    }
};